package com.gogant.spider.core;

import java.net.URLConnection;

/**
 * Connector工厂
 * @param <Sp> 爬虫
 * @param <Req> 请求
 * @param <Resp> 响应
 * @param <Conn> 连接
 */
public interface ConnectorFactory<Sp extends Spider<Req, Resp, Conn>, Req extends Request, Resp extends Response, Conn extends URLConnection> {

	/**
	 * 根据协议创建Connector
	 * @param protocol
	 * @return
	 * @throws SpiderException
	 */
	Connector<Sp, Req, Resp, Conn> createConnector(String protocol) throws SpiderException;

}
